import fetch from '@/api'
// 获取列表
export function getProcessRuleList(params) {
    return fetch({
        method: 'get',
        url: `/flowRule`,
        params,
    })
}

//新增
export function addProcessRule(data) {  
    return fetch({
        method:'post',
        url:`/flowRule`,
        data,
    })
}

// 编辑
export function updateProcessRule(id,data) {
    return fetch({
        method:'put',
        url:`/flowRule/${id}`,
        data,
    })
}

// 删除
export function deleteProcessRule(id) {
    return fetch({
        method:'delete',
        url:`/flowRule/${id}`,
    })
}

// 获取流程规则节点
export function getFlowRuleList(params) {
    return fetch({
        method: 'get',
        url: `/flowRuleNode`,
        params,
    })
}

// 获取规则条件下拉菜单
export function getRuleConditionList(params) {
    return fetch({
        method: 'get',
        url: `/flowRuleFactorSource`,
        params,
    })
}